package gestionTransportObjetsGenerated;

/**
 * Enum definition : TypeEtat
 *
 * @author OpenORB Compiler
*/
public final class TypeEtat implements org.omg.CORBA.portable.IDLEntity
{
    /**
     * Enum member Depot value 
     */
    public static final int _Depot = 0;

    /**
     * Enum member Depot
     */
    public static final TypeEtat Depot = new TypeEtat(_Depot);

    /**
     * Enum member Transfert value 
     */
    public static final int _Transfert = 1;

    /**
     * Enum member Transfert
     */
    public static final TypeEtat Transfert = new TypeEtat(_Transfert);

    /**
     * Enum member Livraison value 
     */
    public static final int _Livraison = 2;

    /**
     * Enum member Livraison
     */
    public static final TypeEtat Livraison = new TypeEtat(_Livraison);

    /**
     * Enum member Clos value 
     */
    public static final int _Clos = 3;

    /**
     * Enum member Clos
     */
    public static final TypeEtat Clos = new TypeEtat(_Clos);

    /**
     * Internal member value 
     */
    private final int _TypeEtat_value;

    /**
     * Private constructor
     * @param  the enum value for this new member
     */
    private TypeEtat( final int value )
    {
        _TypeEtat_value = value;
    }

    /**
     * Maintains singleton property for serialized enums.
     * Issue 4271: IDL/Java issue, Mapping for IDL enum.
     */
    public java.lang.Object readResolve() throws java.io.ObjectStreamException
    {
        return from_int( value() );
    }

    /**
     * Return the internal member value
     * @return the member value
     */
    public int value()
    {
        return _TypeEtat_value;
    }

    /**
     * Return a enum member from its value
     * @param  an enum value
     * @return an enum member
         */
    public static TypeEtat from_int(int value)
    {
        switch (value)
        {
        case 0 :
            return Depot;
        case 1 :
            return Transfert;
        case 2 :
            return Livraison;
        case 3 :
            return Clos;
        }
        throw new org.omg.CORBA.BAD_OPERATION();
    }

    /**
     * Return a string representation
     * @return a string representation of the enumeration
     */
    public java.lang.String toString()
    {
        switch (_TypeEtat_value)
        {
        case 0 :
            return "Depot";
        case 1 :
            return "Transfert";
        case 2 :
            return "Livraison";
        case 3 :
            return "Clos";
        }
        throw new org.omg.CORBA.BAD_OPERATION();
    }

}
